package com.daz.common.inquire.server.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.daz.common.announcement.dao.IAnnouncementDao;
import com.daz.common.announcement.pojo.Announcement;
import com.daz.common.announcement.server.IAnnouncementServer;
import com.daz.common.inquire.dao.IInquireDao;
import com.daz.common.inquire.pojo.Inquire;
import com.daz.common.inquire.server.IInquireServer;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@Service
public class InquireServer implements IInquireServer{
	@Autowired
	private IInquireDao inquireDao;
	public List<Inquire> searchInquires(Map<String, Object> searchconditionMap) throws Exception{
		return inquireDao.searchInquires(searchconditionMap);
	}
	public Boolean addInquire(Inquire inquire) throws Exception{
		if(inquireDao.addInquire(inquire) == 1){
			return true;
		}
		else{
			return false;
		}
	}
	public Boolean updateInquire(Inquire inquire) throws Exception{
		if(inquireDao.updateInquire(inquire) == 1){
			return true;
		}
		else{
			return false;
		}
	}
	public Boolean deleteInquire(List<String> delList) throws Exception{
		if(inquireDao.deleteInquire(delList) == delList.size()){
			return true;
		}else{
			return false;
		}
	}
}	
